package com.srit.migration.business.dao.impl;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import java.util.List;

import com.srit.base.bean.Page;
import com.srit.base.dao.SqlMapDao;
import com.srit.migration.business.bean.ColTypeRel;
import com.srit.migration.business.dao.ColTypeRelDao;

/**
 * @author guan
 * @by daoImpl.tem
 * 
 */
 @Service
public class ColTypeRelDaoImpl implements ColTypeRelDao {
	@Autowired(required = true)
	private SqlMapDao sqlMapDao;

	@Override
	public void save(ColTypeRel colTypeRel) {
		sqlMapDao.save("ColTypeRel.save", colTypeRel);
	}

	@Override
	public void update(ColTypeRel colTypeRel) {
		sqlMapDao.update("ColTypeRel.save", colTypeRel);
	}

	@Override
	public ColTypeRel getById(ColTypeRel colTypeRel) {
		return (ColTypeRel) sqlMapDao.getById("ColTypeRel.getById", colTypeRel.getId());
	}

	@Override
	public void delete(ColTypeRel colTypeRel) {
		sqlMapDao.delete("ColTypeRel.delete", colTypeRel);
	}

	@Override
	public void page(Page page) {
		sqlMapDao.queryForObject("ColTypeRel.page", page);
	}
	
	@Override
	public void batchSave(List<ColTypeRel> colTypeRelList) {
		sqlMapDao.batchSave("ColTypeRel.batchSave", colTypeRelList);

	}

	@Override
	public List list(Page page) {
		return sqlMapDao.queryForList("ColTypeRel.list", page);

	}

}
